<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Gymnasium_id')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <input id="c-gymnasium_id" data-rule="required" data-source="gymnasium/index" class="form-control selectpage" name="row[gymnasium_id]" type="text" value="{$row.gymnasium_id|htmlentities}">-->
<!--        </div>-->
<!--    </div>-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Type')}:</label>
        <div class="col-xs-12 col-sm-8">
                        
            <select  id="c-type" data-rule="required" class="form-control selectpicker" name="row[type]">
                {foreach name="typeList" item="vo"}
                    <option value="{$key}" {in name="key" value="$row.type"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>
    {if $find_gymnasium['is_activity']==1}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('是否优惠')}:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="radio">
                {foreach name="isDiscountList" item="vo"}
                <label for="row[is_discount]-{$key}"><input id="row[is_discount]-{$key}" name="row[is_discount]" type="radio" value="{$key}" {in name="key" value="$row.is_discount"}checked{/in} /> {$vo}</label>
                {/foreach}
            </div>

        </div>
    </div>
    {/if}
    <div class="form-group" id="coach_id" {if $row["type"]!=2}style="display: none;"{/if}>
        <label class="control-label col-xs-12 col-sm-2">{:__('Coach_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-coach_id" data-rule="required" data-source="coach/index" data-params='{"custom[gymnasium_id]":{$row['gymnasium_id']}}' class="form-control selectpage" name="row[coach_id]" type="text" value="{$row.coach_id|htmlentities}">
        </div>
    </div>
    <div class="form-group" id="end_number" {if $row["type"]>2}style="display: none;"{/if}>
        <label class="control-label col-xs-12 col-sm-2">{:__('End_number')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-end_number" data-rule="required,range(0~),integer(+)" class="form-control" name="row[end_number]" type="number" value="{if $row["type"]>2}1{else /}{$row.end_number|htmlentities}{/if}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-title" data-rule="required" class="form-control" name="row[title]" type="text" value="{$row.title|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-price" data-rule="required" class="form-control" step="0.01" name="row[price]" type="number" value="{$row.price|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Thumb_image')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-thumb_image" data-rule="required" class="form-control" size="50" name="row[thumb_image]" type="text" value="{$row.thumb_image|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-thumb_image" class="btn btn-danger faupload" data-input-id="c-thumb_image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-thumb_image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-thumb_image" class="btn btn-primary fachoose" data-input-id="c-thumb_image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-thumb_image"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-thumb_image"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Full_image')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-full_image" data-rule="required" class="form-control" size="50" name="row[full_image]" type="text" value="{$row.full_image|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-full_image" class="btn btn-danger faupload" data-input-id="c-full_image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-full_image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-full_image" class="btn btn-primary fachoose" data-input-id="c-full_image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-full_image"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-full_image"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Content_')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-content_" data-rule="required" class="form-control " rows="5" name="row[content_]" cols="50">{$row.content_|htmlentities}</textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="statusList" item="vo"}
            <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label> 
            {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-weigh" data-rule="required" class="form-control" name="row[weigh]" type="number" value="{$row.weigh|htmlentities}">
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
